﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace OnlineCooperation.Entity
{
    public class File
    {
        public int ID;                                           //共8位，前4位为文件编号，后4位为版本编号
        public String Name;                                 //拥有.coco后缀的文件可以打开在线编辑
        public Char Type;                                    //T(Team)/U(User) 标记是团队文件还是个人文件
        public int OwnerID;                                //TeamID/UserID
        public String Path;                                  //在服务器的存放路径
        public DateTime DateAndTime;               //创建日期、时间 
        public String Description;                       //允许空

        //空构造函数
        public File()
        {
            ID = 0;
            Name = null;
            Type = ' ';
            OwnerID = 0;
            Path = null;
            DateAndTime = new DateTime(); 
            Description = null;
        }

        //给定除Description外全部参数的构造函数
        public File(int id, String name, Char type, String path, int ownerid, DateTime dateandtime)
        {
            ID = id;
            Name = name;
            Type = type;
            OwnerID = ownerid;
            Path = path;
            DateAndTime = dateandtime;
            Description = null;
        }

        //给定全部参数的构造函数
        public File(int id, String name, Char type, String path, int ownerid, DateTime dateandtime, String description)
        {
            ID = id;
            Name = name;
            Type = type;
            OwnerID = ownerid;
            Path = path;
            DateAndTime = dateandtime;
            Description = description;
        }
    }
}